use strict;

use lib '../';

use XiaoNei::API;
use XiaoNei::Utils;
use Data::Dumper;

my $rh_param = {
'xn_sig_method' => 'get',
'xn_sig_expires' => '0',
'xn_sig_user' => '248188729',
'xn_sig_time' => '1216609495645',
'xn_sig_added' => '1',
'xn_sig_in_iframe' => '0',
'xn_sig_session_key' => '8lfu4X47sCDH8tvZIcLEKuaGvYgy9chj09nKSzscz3F53mJHdEWnYkdEFuyzBRne-248188729',
'xn_sig_api_key' => '637101d422414b5d8de3f290658e7ae3'
};

$rh_param = XiaoNei::Utils::parse_param($rh_param);

#$rh_param->{uids} = '221912002,245989450';
#$rh_param->{fields} = 'name,sex,hometown_location';

#print Dumper(XiaoNei::API::call('xiaonei.users.getInfo', $rh_param));



#print Dumper(XiaoNei::API::call('xiaonei.friends.getFriends', $rh_param));

#print Dumper(XiaoNei::API::call('xiaonei.users.getLoggedInUser', $rh_param));

#print Dumpexr(XiaoNei::API::call('xiaonei.users.isAppAdded', $rh_param));

#print Dumper(XiaoNei::API::call('xiaonei.profile.getXNML', $rh_param));


#$rh_param->{uids1} = '221912002,245989450';

#$rh_param->{uids2} = '240463655,221912002';
#print Dumper(XiaoNei::API::call('xiaonei.friends.areFriends', $rh_param));

#print Dumper(XiaoNei::API::call('xiaonei.friends.getAppUsers', $rh_param));


#$rh_param->{template_id} = 1;
#$rh_param->{resource_id} = 6;
#$rh_param->{body_data} =sprintf("{url:%s%s%s}", '"', "http://apps.xiaonei.com/daomeigui/test/me?uid=248188729", '"');

 
#print Dumper(XiaoNei::API::call('xiaonei.feed.publishTemplatizedAction', $rh_param));

#print Dumper(XiaoNei::API::call('xiaonei.friends.get', $rh_param));
$rh_param->{to_ids} = '';
$rh_param->{notification} = 'hello';

print Dumper(XiaoNei::API::call('xiaonei.notifications.send', $rh_param));
 